// elementele 
var main = $("#main");
var taskbar = $("#taskbar");
var clock = $("#clock");
var trash = $("#trash");
var icons = $(".icon");

//PreFetch
$.getScript("js/load.js");
$.getScript("js/view.js");
$.getScript("js/friends.js");



//ceas
function updateClock(){
	var now = new Date();
	var hour = now.getHours();
	if(hour < 10) hour = "0" + hour;
    var mins = now.getMinutes();
	if(mins < 10) mins = "0" + mins;
    var secs = now.getSeconds();
	if(secs < 10) secs = "0" + secs;
	//echo ceas
	clock.html(hour + " : " + mins + " : " + secs);
	//recursiv
    setTimeout("updateClock()", 1000);
}

$(document).ready(function(){
       $("body").fadeIn(1500);

        
        //cancel context menu
        icons.draggable();
	
	//arata icons
	icons.fadeIn(1500);
	taskbar.slideDown();
	
	//arata timp
	updateClock();
	
	//meniul contextual (click dreapta)


});